
import { request } from '@ruifox-cms/utils'

// 根据folderId查询文件
export function selectByFolderId(params) {
  return request({
    url: '/resource/folderResource/selectByFolderId',
    method: 'get',
    params
  })
}
// 根据文件id查详情
export function selectById(params) {
  return request({
    url: '/resource/folderResource/selectById',
    method: 'get',
    params
  })
}
// 后台搜索
export function folderResourceSelectHome(params) {
  return request({
    url: '/resource/folderResource/selectHome',
    method: 'get',
    params
  })
}
// 高级搜索
export function folderResourceSelectGreat(params) {
  return request({
    url: '/resource/folderResource/selectGreat',
    method: 'get',
    params
  })
}

// 新增文件
export function folderResourceCreate(data) {
  return request({
    url: '/resource/folderResource/create',
    method: 'post',
    data
  })
}
// 批量新增文件
export function folderResourceInsertList(data) {
  return request({
    url: '/resource/folderResource/insertList',
    method: 'post',
    data
  })
}
// 删除文件
export function folderResourceDelete(data) {
  return request({
    url: '/resource/folderResource/delete',
    method: 'post',
    data
  })
}
// 批量删除文件
export function folderResourceDeleteList(data) {
  return request({
    url: '/resource/folderResource/deleteList',
    method: 'post',
    data
  })
}
// 修改文件
export function folderResourceUpdate(data) {
  return request({
    url: '/resource/folderResource/update',
    method: 'post',
    data
  })
}
// 文件排序
export function folderResourceUpdateSort(data) {
  return request({
    url: '/resource/folderResource/updateSort',
    method: 'post',
    data
  })
}
